<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>分页之布局 - jQuery EasyUI 演示</title>
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
	<h2 title="Pagination Layout">分页之布局</h2>
	<p title="The pagination layout supports various types of pages which you can choose.">　　分页布局支持所能选择的各种类型页面。</p>
	<div style="margin:20px 0;"></div>
	<div class="easyui-panel">
		<div id="pp" class="easyui-pagination" data-options="
					total:114,
					layout:['first','prev','next','last','info']
				"></div>
	</div>
	<div style="margin-top:10px">
		<select onchange="setLayout(this.value)">
			<option value="1">首 上 下 尾</option>
			<option value="2">每页行数｜首 上｜手工输入页码｜下 尾｜刷新</option>
			<option value="3">数字链接</option>
			<option value="4">首 上｜数字链接｜下 尾</option>
			<option value="5">首 上 下 尾｜数字链接｜转到页码</option>
		</select>
	</div>
	<script>
		function setLayout(type){
			var p = $('#pp');
			switch(parseInt(type)){
			case 1:
				p.pagination({layout:['first','prev','next','last','info']});
				break;
			case 2:
				p.pagination({
					layout:['list','sep','first','prev','sep','manual','sep','next','last','sep','refresh'],
					beforePageText:'第',
					afterPageText:'页，共{pages}页'
				});
				break;
			case 3:
				p.pagination({layout:['links']});
				break;
			case 4:
				p.pagination({layout:['first','prev','links','next','last']});
				break;
			case 5:
				p.pagination({
					layout:['first','prev','next','last','sep','links','sep','manual','info'],
					beforePageText:'转到第',
					afterPageText:'页'
				});
				break;
			}
		}
	</script>
</body>
</html>